<div id="cert-form" class="form-area" >
    <form id="form-cert" action="/invitation/certs_create" method="post">
        <input type="hidden" name="method" value="do">
        <input type="hidden" name="CSRFToken" value="${CSRFToken!""}"/>
        <table width="100%" class="dj-form-base">
            <col width="90">
            <col width="*">
            <tr>
                <th>证书名称：</th>
                <td>
                    <input type="text"  id="cert-input" style="display: none;"/>
                    <div class="selectResult clearfix dig-selected" id="cert-result">
                    <#if dictCerts??>
                        <#assign needSize= (10- dictCerts?size)/>
                        <#list dictCerts as cert>
                            <a href="javascript:void(0);" class="ticket clean g3" name="certId" value="${(cert.id)!}"><span class="text">${(cert.name)!}</span><span class="delete">移除</span></a>
                        </#list>
                        <#if dictCerts?size &lt; 10><em class="sheng"><#if needSize==10>添加证书<#else >可再选${needSize!""}项</#if></em></#if>
                    </#if>
                    </div>
                    <input type="hidden" name="certIds" value="${dictCertIds!""}" id="cert-hidden">
                    <a href="javascript:void(0);" id="cert-link" style="display:none" class="arrowhandler">打开</a>
                </td>
                <script type="text/javascript">

                    $('#cert-result').live('click',function(){

                        $('#cert-input').click();
                    }).live('touchend',function(){
                                $('#cert-input').click();
                            });
                    $('#cert-link').pickpad({title: '添加获得证书', width: 765,oncomplete:function(){
                        result('cert',10);
                    }
                    });
                    $('#cert-result .delete').die().live('click',function(e){
                        e.stopPropagation()
                        e.stopImmediatePropagation()
                        deleteDate($(this),'cert','添加证书', 10)
                    }).live('touchend',function(e){
                                e.stopPropagation()
                                e.stopImmediatePropagation()
                                deleteDate($(this),'cert','添加证书', 10)
                            })
                </script>
            </tr>
            <tr class="last-tr">
                <th></th>
                <td>
                    <div class="textarea-box hidden" style="padding:0">
                        <textarea blankvalue="这里可以填写其他证书"  class="textarea-con other-textarea J_checkInput" blankclass="g9" reg="^.{0,300}$" name="cert" blankSubmit="true" maxnum="300">${(writeCert.name)!""}</textarea>
                        <p class="alignright"><span  class="g9 J_lastNum"><span>0</span>/300</span></p>
                    </div>
                </td>
            </tr>
            <tr>
                <th></th>
                <td class="input button">
                    <a href="javascript:void(0);" class="fresh margin formValidateSubmit" id="J_formSubmit" itemtype="cert"><span>保存</span></a><a href="javascript:void(0);" class="normal J_cancel" itemtype="cert"><span>取消</span></a>
                </td>
            </tr>
        </table>
    </form>
    <style type="text/css">
        #cert-dialog-content-pickarea{width:720px; _width:auto;}/*解决chrome下瞬间被撑开的问题*/
    </style>
    <div id="cert-dialog" style="display:none;">
        <div id="cert-dialog-content" class="dialog-content picksection">
        <#assign dialogContentName = "cert" >
        <#assign maxSelect = "10">
        <#include "../../common/dialog-content-new.ftl" >
        </div>
    </div>
</div>
